namespace UniversalAdminSystem.Domian.SystemSettings.ValueObjects;

public record SettingKey
{
    public string Value { get; }
    private SettingKey(string value)
    {
        if (string.IsNullOrWhiteSpace(value))
            throw new ArgumentException("设置Key不能为空");
        if (value.Length > 100)
            throw new ArgumentException("设置Key不能超过100字符");
        Value = value;
    }
    public static SettingKey Create(string value) => new(value);
    public static implicit operator string(SettingKey key) => key.Value;
} 